class Phone:
    IMEI = None # 序列号
    producer = "HM" # 厂商

    def call_by_4g(self):
        print("4g通话")
# # 定义子类，复写父类成员
# class MyPhone(Phone):
#     producer = "ITHEIMA"
#
#     def call_by_5g(self):
#         print("开启cpu单核模式，确保通话的时候省电")
#         print("5g通话")
#
# phone = MyPhone()
# print(phone.producer)
# phone.call_by_5g()

# 调用父类成员
class MyPhone(Phone):
    producer = "ITHEIMA"

    def call_by_5g(self):
        # 方法1
        # print(f"父类的厂商是：{Phone.producer}")
        # Phone.call_by_4g(self)
        # 方法2
        print(f"父类的厂商是{super().producer}")
        super().call_by_4g()

phone = MyPhone()
phone.call_by_5g()